<section class="course-detail-header {{ layoutClass|default('') }}">
  <div class="container">

    {% block before_content %}{% endblock %}

    <div class="es-section clearfix">
      {% block content %}{% endblock %}

      {% if member.role|default('') == 'teacher' or is_granted('ROLE_ADMIN') %}
        <a href="{{ path('course_manage', {id:course.id}) }}" class="btn btn-default setting hidden-xs hidden-sm" title="{{'课程管理'|trans}}">
          <i class="es-icon es-icon-setting"></i>
        </a>
      {% endif %}
      
      {% if member|default(false) %}
        {% if not member.fake|default(false) and member.role == 'student' and member.joinedType == 'course' %}
          {% if member.orderId  %}
            <a href="#modal" class="btn btn-default setting hidden-xs hidden-sm" data-toggle="modal" data-url="{{ path('order_refund', {id:course.id, targetType:'course'}) }}">
              <i class="es-icon es-icon-exit"></i>
            </a>
          {% else %}
            <a id="exit-course-learning" class="course-exit-btn btn btn-default setting hidden-xs hidden-sm" href="javascript:;" data-url="{{ path('course_exit', {id:course.id}) }}"  data-goto="{{ path('course_show', {id:course.id}) }}" {% if member.role != 'student' %} disabled {% endif %}>
              <i class="es-icon es-icon-exit"></i>
            </a>
          {% endif %}
        {% elseif member["joinedType"] == 'groupSell'%}
          <a class="btn btn-default setting hidden-xs hidden-sm" href="javascript:;" data-toggle="tooltip" data-placement="top" title="组合购买课程不能退出">
            <i class="hz-icon icon-exit"></i>
          </a>
        {% endif %}
      {% endif %}
    </div>
  </div>
</section>

{% block after_content %}{% endblock %}


